package com.h2wallet.newsapi.modular.news.repository;

import com.h2wallet.newsapi.modular.news.entity.ArticleEntity;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface ArticleRepository extends JpaRepository<ArticleEntity, Integer> {

    List<ArticleEntity> findAllByTypeIdAndDeletedFalse(Integer typeId, Pageable pageable);

    int countByTypeIdAndDeletedFalse(Integer typeId);
}
